//
//  PlayerDetailViewController.h
//  SHEL
//
//  Created by Jennifer Guriel on 11/15/11.
//  Copyright 2011 Washington University. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "CorePlot-CocoaTouch.h"

@interface PlayerDetailViewController : UIViewController <CPTPlotDataSource>{
	IBOutlet UILabel *hits;
	IBOutlet UILabel *temperature;
	IBOutlet UILabel *thits;
	IBOutlet CPTGraphHostingView *graphView;
	IBOutlet UISegmentedControl *dataToPlot;
	IBOutlet UISegmentedControl *datesToPlot;
	
	NSMutableArray *history;
	NSMutableArray *trauma;
	
	CPTScatterPlot *dataSourceLinePlot1;
	CPTScatterPlot *dataSourceLinePlot2;
	CPTScatterPlot *dataSourceLinePlot3;
	
	CPTXYGraph *graph;
	NSMutableArray *dataForPlot;
	NSMutableArray *hitsPlot;
	NSMutableArray *traumaPlot;
	NSMutableArray *tempPlot;
}

@property (nonatomic, retain) IBOutlet CPTGraphHostingView* graphView;
@property (nonatomic, retain) IBOutlet UILabel* hits;
@property (nonatomic, retain) IBOutlet UILabel* thits;
@property (nonatomic, retain) IBOutlet UILabel* temperature;
@property (nonatomic, retain) IBOutlet UISegmentedControl* dataToPlot;
@property (nonatomic, retain) IBOutlet UISegmentedControl* datesToPlot;
@property (readwrite, retain, nonatomic) NSMutableArray *dataForPlot;
@property (readwrite, retain, nonatomic) NSMutableArray *hitsPlot;
@property (readwrite, retain, nonatomic) NSMutableArray *traumaPlot;
@property (readwrite, retain, nonatomic) NSMutableArray *tempPlot;

-(IBAction) dataSegCtrlIndexChanged;
-(IBAction) datesSegCtrlIndexChanged;

-(id)initWithNibNameAndIndex:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil index:(int)index name:(NSString*)name history:(NSMutableArray*)historyInput trauma:(NSMutableArray*)traumaInput;
-(BOOL) recordIsToday:(NSString*)record;
-(int) dateOffset:(NSDate*)referenceDate rec:(NSString*)recordDateStr;

@end
